<html>
<head><meta charset="utf-8"><title>Pre-reserving a DepNodeIndex · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Pre-reserving.20a.20DepNodeIndex.html">Pre-reserving a DepNodeIndex</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="224705844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Pre-reserving%20a%20DepNodeIndex/near/224705844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Pre-reserving.20a.20DepNodeIndex.html#224705844">(Feb 01 2021 at 10:07)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="306073">@Tyson Nottingham</span>. I am trying to extend the query system with push-based semantics: allow a query to opportunistically fill another query's cache. In order to correctly implement this, I need to have access to the current query's DepNodeIndex (ie. the query being executed). I can't find how to do that since you refactored the <code>DepGraph</code>. Do you have some pointers?</p>



<a name="224780337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Pre-reserving%20a%20DepNodeIndex/near/224780337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tyson Nottingham <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Pre-reserving.20a.20DepNodeIndex.html#224780337">(Feb 01 2021 at 19:42)</a>:</h4>
<p><span class="user-mention" data-user-id="248906">@cjgillot</span>, the <code>DepNodeIndex</code> that the next node to be inserted into the graph will have is the current length of <code>DepNodeData::hybrid_indices</code>, i.e. <code>hybrid_indices.next_index()</code>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>